<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class AdminMenusSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        $admin_menus = [
            ['pid' => 0, 'name' => '系统管理', 'flag' => '', 'url' => '', 'icon' => 'fa-cogs'],
            ['pid' => 0, 'name' => '内容管理', 'flag' => '', 'url' => '', 'icon' => 'fa-cogs'],

            ['pid' => 1, 'name' => '系统用户', 'flag' => 'admin_users', 'url' => '/admin/users/index', 'icon' => 'fa-user'],
            ['pid' => 1, 'name' => '角色管理', 'flag' => 'admin_roles', 'url' => '/admin/roles/index', 'icon' => 'fa-group'],
            ['pid' => 1, 'name' => '权限管理', 'flag' => 'admin_permissions', 'url' => '/admin/permissions/index', 'icon' => 'fa-check-square-o',],
            ['pid' => 1, 'name' => '菜单管理', 'flag' => 'admin_menus', 'url' => '/admin/menus/index', 'icon' => 'fa-navicon'],
            ['pid' => 2, 'name' => '栏目管理', 'flag' => 'admin_users', 'url' => '/admin/users/index', 'icon' => 'fa-user'],
            ['pid' => 2, 'name' => '文章管理', 'flag' => 'admin_roles', 'url' => '/admin/roles/index', 'icon' => 'fa-group']
        ];
        DB::table('admin_menus')->insert($admin_menus);
    }
}
